<?php
  
   require "../../system/framework.php"; 
  
  $filename = $_REQUEST['filename'];
 //  echo $filename."*****";    
  
  $newFilename=str_ireplace(".html", ".php", $filename);
  $newFilename = "/code/template/$newFilename";
  
  global $dataDir;
  $filename = "$dataDir/template/$filename";
  
  
 
  
  
  //$code = new code();
  //$code->compileTemplate();

  //$code->compileFile($filename, $newFilename, true);   
  $compile = new compile();
  $compile->compileFile($filename, $newFilename, true);
  
  http::redirect("");  
  
  
?>
